Python 3.11.0 | packaged by conda-forge | (main, Jan 16 2023, 14:12:30) [MSC v.1916 64 bit (AMD64)]
Type 'copyright', 'credits' or 'license' for more information
IPython 8.12.2 -- An enhanced Interactive Python. Type '?' for help.
MEASURE_FOLDER = os.path.join(EXP_FOLDER, '28SeptFullRun')
df = get_data_frame(MEASURE_FOLDER)
df.drop(columns='betaPAErr', inplace=True)
df.dropna(inplace=True)
dfc = df.copy()
100%|██████████| 601/601 [22:10<00:00, 2.21s/it]
df_grouped = df.groupby(by=['pump_reference', 'pump_AOM_freq'])
groups = dict(list(df_grouped))
dfs = [df for df in groups.values()]
max_freqs = [384183.3]*len(dfs)
zipped_data = list(zip(dfs, max_freqs))
fig1, ax1s = plt.subplots(5)
fig2, ax2s = plt.subplots(3)
for i, (df, max_freq) in enumerate(zipped_data[:]):
j1 = i//3
j2 = i%3
data = df.dropna()
freqs = ((max_freq-PUMP_FREQUENCY)-(data['tempV']-data['tempV'].min())*FREQVSVOLT- (data['currV']-0.0)*FREQVSCURR)
ax2s[j2] = plot_spline_fit(ax2s[j2], x=freqs, y=data['ratio'], yerr=data['ratioErr'],scolor=f'C{j1}', mfc=f'C{j1}',color=f'C{j1}', s=0.0, ms=5, figsize=(5, 25), linewidth=1.5, label=f"Detuning = { 180-2*df.iloc[0]['pump_AOM_freq'] :.2f}", fig=fig2)
ax2s[j2].set_title(f"Pump Amplituide = { df.iloc[10]['pump_reference'] :.2f}", **titledict)
ax2s[j2].legend()
ax1s[j1] = plot_spline_fit(ax1s[j1], x=freqs, y=data['ratio'], yerr=data['ratioErr'],scolor=f'C{j2}', mfc=f'C{j2}',color=f'C{j2}', s=0.0, ms=5, figsize=(5, 25), linewidth=1.5, label=f"Pump Amplitude = { df.iloc[0]['pump_reference'] :.2f}", fig=fig1)
ax1s[j1].set_title(f"Detuning = { 180-2*df.iloc[10]['pump_AOM_freq'] :.2f}", **titledict)
ax1s[j1].legend()
fig1.tight_layout()
fig2.tight_layout()
fig1.savefig(os.path.join(MEASURE_FOLDER, 'lossFeaturesDet.png'))
plt.show()
plt.close()
fig2.savefig(os.path.join(MEASURE_FOLDER, 'lossFeaturesPA.png'))
plt.show()
plt.close()
df = dfc.copy()
df_grouped = df.groupby(by=['pump_reference', 'pump_AOM_freq'])
groups = dict(list(df_grouped))
dfs = [df for df in groups.values()]
max_freqs = [384183.3]*len(dfs)
zipped_data = list(zip(dfs, max_freqs))
fig1, ax1s = plt.subplots(5)
fig2, ax2s = plt.subplots(3)
for i, (df, max_freq) in enumerate(zipped_data[:]):
j1 = i%5
j2 = i//5
data = df.dropna()
freqs = ((max_freq-PUMP_FREQUENCY)-(data['tempV']-data['tempV'].min())*FREQVSVOLT- (data['currV']-0.0)*FREQVSCURR)
ax2s[j2] = plot_spline_fit(ax2s[j2], x=freqs, y=data['ratio'], yerr=data['ratioErr'],scolor=f'C{j1}', mfc=f'C{j1}',color=f'C{j1}', s=0.0, ms=5, figsize=(5, 25), linewidth=1.5, label=f"Detuning = { 180-2*df.iloc[0]['pump_AOM_freq'] :.2f}", fig=fig2)
ax2s[j2].set_title(f"Pump Amplituide = { df.iloc[0]['pump_reference'] :.2f}", **titledict)
ax2s[j2].legend()
ax1s[j1] = plot_spline_fit(ax1s[j1], x=freqs, y=data['ratio'], yerr=data['ratioErr'],scolor=f'C{j2}', mfc=f'C{j2}',color=f'C{j2}', s=0.0, ms=5, figsize=(5, 25), linewidth=1.5, label=f"Pump Amplitude = { df.iloc[0]['pump_reference'] :.2f}", fig=fig1)
ax1s[j1].set_title(f"Detuning = { 180-2*df.iloc[0]['pump_AOM_freq'] :.2f}", **titledict)
ax1s[j1].legend()
fig1.tight_layout()
fig2.tight_layout()
fig1.savefig(os.path.join(MEASURE_FOLDER, 'lossFeaturesDet.png'))
plt.show()
plt.close()
fig2.savefig(os.path.join(MEASURE_FOLDER, 'lossFeaturesPampl.png'))
plt.show()
plt.close()
df = dfc.copy()
df_grouped = df.groupby(by=['pump_reference', 'pump_AOM_freq'])
groups = dict(list(df_grouped))
dfs = [df for df in groups.values()]
max_freqs = [384183.3]*len(dfs)
zipped_data = list(zip(dfs, max_freqs))
fig1, ax1s = plt.subplots(5)
fig2, ax2s = plt.subplots(3)
fig1.set_size_inches(6, 20)
fig2.set_size_inches(6, 20)
for i, (df, max_freq) in enumerate(zipped_data[:]):
j1 = i%5
j2 = i//5
data = df.dropna()
freqs = ((max_freq-PUMP_FREQUENCY)-(data['tempV']-data['tempV'].min())*FREQVSVOLT- (data['currV']-0.0)*FREQVSCURR)
betaPAs = [a for a,b in sorted(zip(data['betaPA'], freqs), key=lambda pair:pair[1])]
freqs = sorted(freqs)
ax2s[j2].plot(freqs, betaPAs, 'o-', color=f'C{j1}', ms=5, label=f"Detuning = { 180-2*df.iloc[0]['pump_AOM_freq'] :.2f}")
ax2s[j2].set_title(f"Pump Amplituide = { df.iloc[0]['pump_reference'] :.2f}", **titledict)
ax2s[j2].legend()
ax1s[j1].plot(freqs, betaPAs, 'o-', color=f'C{j2}', ms=5, label=f"Pump Amplitude = { df.iloc[0]['pump_reference'] :.2f}")
ax1s[j1].set_title(f"Detuning = { 180-2*df.iloc[0]['pump_AOM_freq'] :.2f}", **titledict)
ax1s[j1].legend()
fig1.tight_layout()
fig2.tight_layout()
#fig1.savefig(os.path.join(MEASURE_FOLDER, 'lossFeaturesDet.png'))
plt.show()
plt.close()
#fig2.savefig(os.path.join(MEASURE_FOLDER, 'lossFeaturesPampl.png'))
plt.show()
plt.close()
dfc[(dfc['pump_reference'] == 0.7625)]
| sampleRate | extraTime | timeHold | timeBaseline | timeTest | timeLoad | timeF1 | offset | baseVolt | BaseVoltErr | ... | precut_t | filtertime | master_clear | tempV | currV | cat_AOM_freq | cat_AOM_ampl | cat_deload_t | MOT_reload_t | timestamp |
|---|
0 rows × 118 columns
dfc[(dfc['pump_AOM_freq'] == 84.0) & (dfc['pump_reference'] < 0.8)][['betaPA', 'timestamp'] ]
| betaPA | timestamp | |
|---|---|---|
| 51 | 3.309983 | 1900-01-01 01:01:54 |
| 52 | 0.450151 | 1900-01-01 01:03:06 |
| 53 | 0.287392 | 1900-01-01 01:04:18 |
| 54 | 0.119637 | 1900-01-01 01:05:30 |
| 55 | 0.208384 | 1900-01-01 01:06:42 |
| 56 | 0.368674 | 1900-01-01 01:07:54 |
| 57 | 0.959289 | 1900-01-01 01:09:06 |
| 58 | 0.041497 | 1900-01-01 01:10:18 |
| 59 | 3.406206 | 1900-01-01 01:11:30 |
| 60 | 0.318688 | 1900-01-01 01:12:42 |
| 61 | 0.055014 | 1900-01-01 01:13:54 |
| 62 | 0.123487 | 1900-01-01 01:15:06 |
| 63 | 0.796368 | 1900-01-01 01:16:18 |
| 64 | 0.411875 | 1900-01-01 01:17:30 |
| 65 | 0.802015 | 1900-01-01 01:18:42 |
| 66 | 0.640599 | 1900-01-01 01:19:54 |
| 67 | 0.417335 | 1900-01-01 01:21:06 |
| 68 | 0.566864 | 1900-01-01 01:22:18 |
| 69 | 0.524326 | 1900-01-01 01:23:30 |
| 70 | 0.253015 | 1900-01-01 01:24:42 |
| 71 | 0.082638 | 1900-01-01 01:25:54 |
| 72 | 0.191348 | 1900-01-01 01:27:06 |
| 73 | 0.187672 | 1900-01-01 01:28:18 |
| 74 | 0.103866 | 1900-01-01 01:29:30 |
| 75 | 0.365836 | 1900-01-01 01:30:42 |
| 76 | 4.139996 | 1900-01-01 01:31:54 |
| 77 | 0.271457 | 1900-01-01 01:33:06 |
| 78 | 0.137750 | 1900-01-01 01:34:18 |
| 79 | 2.915203 | 1900-01-01 01:35:30 |
| 80 | 3.903975 | 1900-01-01 01:36:42 |
| 81 | 0.278113 | 1900-01-01 01:37:54 |
| 82 | 1.177718 | 1900-01-01 01:39:06 |
| 83 | 0.359210 | 1900-01-01 01:40:18 |
| 84 | 2.186490 | 1900-01-01 01:41:30 |
| 85 | 0.199127 | 1900-01-01 01:42:42 |
| 86 | 0.382669 | 1900-01-01 01:43:54 |
| 87 | 0.699960 | 1900-01-01 01:45:06 |
| 88 | 0.300958 | 1900-01-01 01:46:18 |
| 89 | 0.474162 | 1900-01-01 01:47:31 |
| 90 | 0.195849 | 1900-01-01 01:48:43 |
dfc[(dfc['pump_AOM_freq'] == 83.0) & (dfc['pump_reference'] < 0.8)][['betaPA', 'timestamp'] ]
| betaPA | timestamp | |
|---|---|---|
| 531 | 1.774020e-01 | 1900-01-01 22:27:15 |
| 532 | 1.760921e+00 | 1900-01-01 22:28:35 |
| 533 | 3.240879e-01 | 1900-01-01 22:30:16 |
| 534 | 1.182990e+00 | 1900-01-01 22:31:36 |
| 535 | 3.531493e-01 | 1900-01-01 22:33:01 |
| 536 | 5.326628e-12 | 1900-01-01 22:34:30 |
| 537 | 7.749401e-01 | 1900-01-01 22:35:57 |
| 538 | 1.531048e-07 | 1900-01-01 22:37:24 |
| 539 | 5.018208e-13 | 1900-01-01 22:38:51 |
| 540 | 1.542404e+01 | 1900-01-01 22:40:17 |
| 541 | 6.927596e-01 | 1900-01-01 22:41:44 |
| 542 | 2.187805e-12 | 1900-01-01 22:43:12 |
| 543 | 4.462498e-01 | 1900-01-01 22:44:37 |
| 544 | 2.322788e-09 | 1900-01-01 22:46:03 |
| 545 | 3.123936e+00 | 1900-01-01 22:47:33 |
| 546 | 3.040901e-12 | 1900-01-01 22:49:01 |
| 547 | 3.574465e-10 | 1900-01-01 22:50:27 |
| 548 | 4.965897e-01 | 1900-01-01 22:51:54 |
| 549 | 6.892042e-12 | 1900-01-01 22:53:21 |
| 550 | 1.854949e+00 | 1900-01-01 22:54:47 |
| 551 | 6.866640e-01 | 1900-01-01 22:56:14 |
| 552 | 7.838930e+00 | 1900-01-01 22:57:42 |
| 553 | 3.430268e+00 | 1900-01-01 22:59:09 |
| 554 | 3.950584e+00 | 1900-01-01 23:00:38 |
| 555 | 2.108447e+00 | 1900-01-01 23:02:03 |
| 556 | 7.435618e-08 | 1900-01-01 23:03:28 |
| 557 | 2.089072e-01 | 1900-01-01 23:04:55 |
| 558 | 3.628473e+00 | 1900-01-01 23:06:22 |
| 559 | 4.131470e-08 | 1900-01-01 23:07:49 |
| 560 | 4.336303e-09 | 1900-01-01 23:09:16 |
| 561 | 1.072106e-09 | 1900-01-01 23:10:42 |
| 562 | 6.413689e-01 | 1900-01-01 23:12:09 |
| 563 | 1.993138e-01 | 1900-01-01 23:13:39 |
| 564 | 2.053789e+00 | 1900-01-01 23:15:06 |
| 565 | 4.842033e-08 | 1900-01-01 23:16:33 |
| 566 | 5.991808e-01 | 1900-01-01 23:18:01 |
| 567 | 2.106691e-02 | 1900-01-01 23:19:28 |
| 568 | 2.684074e-01 | 1900-01-01 23:20:55 |
| 569 | 9.570122e-14 | 1900-01-01 23:22:23 |
| 570 | 1.400616e-01 | 1900-01-01 23:23:49 |
dh1 = load_single_run('C:\Users\svars\OneDrive\Desktop\UBC Lab\CATExperiment\CATMeasurements\28SeptFullRun\22-40-17')
Cell In[29], line 1 dh1 = load_single_run('C:\Users\svars\OneDrive\Desktop\UBC Lab\CATExperiment\CATMeasurements\28SeptFullRun\22-40-17') ^ SyntaxError: (unicode error) 'unicodeescape' codec can't decode bytes in position 2-3: truncated \UXXXXXXXX escape
dh1 = load_single_run(r'C:\Users\svars\OneDrive\Desktop\UBC Lab\CATExperiment\CATMeasurements\28SeptFullRun\22-40-17')
dfc[(dfc['pump_AOM_freq'] == 83.0) & (dfc['pump_reference'] < 1.14) & (dfc['pump_reference'] > 0.9)][['betaPA', 'timestamp'] ]
| betaPA | timestamp | |
|---|---|---|
| 0 | 6.199216e-02 | 1900-01-01 00:00:39 |
| 1 | 2.334133e-12 | 1900-01-01 00:01:51 |
| 2 | 1.657226e-09 | 1900-01-01 00:03:03 |
| 3 | 1.084179e-01 | 1900-01-01 00:04:15 |
| 4 | 1.507625e-03 | 1900-01-01 00:05:27 |
| 5 | 7.411405e-12 | 1900-01-01 00:06:38 |
| 6 | 3.522036e-01 | 1900-01-01 00:07:51 |
| 7 | 1.633247e-08 | 1900-01-01 00:09:03 |
| 8 | 5.639933e-14 | 1900-01-01 00:10:16 |
| 9 | 1.097438e-02 | 1900-01-01 00:11:28 |
| 10 | 5.589925e-02 | 1900-01-01 00:12:40 |
| 571 | 4.405692e-02 | 1900-01-01 23:25:15 |
| 572 | 2.502242e-01 | 1900-01-01 23:26:43 |
| 573 | 1.327300e+00 | 1900-01-01 23:27:59 |
| 574 | 1.840282e+00 | 1900-01-01 23:29:14 |
| 575 | 9.088021e-09 | 1900-01-01 23:30:28 |
| 576 | 3.724222e-01 | 1900-01-01 23:31:41 |
| 577 | 1.555463e+00 | 1900-01-01 23:32:55 |
| 578 | 6.801906e-03 | 1900-01-01 23:34:08 |
| 579 | 1.371795e-01 | 1900-01-01 23:35:21 |
| 580 | 4.032927e-01 | 1900-01-01 23:36:34 |
| 581 | 1.841765e-10 | 1900-01-01 23:37:47 |
| 582 | 5.884259e-02 | 1900-01-01 23:39:00 |
| 583 | 2.520008e+00 | 1900-01-01 23:40:12 |
| 584 | 1.097229e-08 | 1900-01-01 23:41:25 |
| 585 | 7.841562e-01 | 1900-01-01 23:42:37 |
| 586 | 3.723999e-07 | 1900-01-01 23:43:50 |
| 587 | 5.608497e-01 | 1900-01-01 23:45:02 |
| 588 | 3.804618e-01 | 1900-01-01 23:46:14 |
| 589 | 2.863642e-01 | 1900-01-01 23:47:27 |
| 590 | 1.217655e-01 | 1900-01-01 23:48:39 |
| 591 | 1.796249e-03 | 1900-01-01 23:49:51 |
| 592 | 6.044906e-01 | 1900-01-01 23:51:03 |
| 593 | 2.246985e-01 | 1900-01-01 23:52:15 |
| 594 | 7.801304e-07 | 1900-01-01 23:53:27 |
| 595 | 8.649304e-01 | 1900-01-01 23:54:39 |
| 596 | 1.536864e-08 | 1900-01-01 23:55:51 |
| 597 | 1.592029e-09 | 1900-01-01 23:57:03 |
| 598 | 9.058798e-11 | 1900-01-01 23:58:15 |
| 599 | 3.779783e-09 | 1900-01-01 23:59:27 |
dfc[(dfc['pump_AOM_freq'] == 83.0) & (dfc['pump_reference'] < 1.14) & (dfc['pump_reference'] > 0.9)][['betaPA', 'timestamp'] ][dfc['betaPA']>1]
<ipython-input-32-a2d324bca11b>:1: UserWarning: Boolean Series key will be reindexed to match DataFrame index. dfc[(dfc['pump_AOM_freq'] == 83.0) & (dfc['pump_reference'] < 1.14) & (dfc['pump_reference'] > 0.9)][['betaPA', 'timestamp'] ][dfc['betaPA']>1]
| betaPA | timestamp | |
|---|---|---|
| 573 | 1.327300 | 1900-01-01 23:27:59 |
| 574 | 1.840282 | 1900-01-01 23:29:14 |
| 577 | 1.555463 | 1900-01-01 23:32:55 |
| 583 | 2.520008 | 1900-01-01 23:40:12 |
dfc[(dfc['pump_AOM_freq'] == 83.0) & (dfc['pump_reference'] < 1.14) & (dfc['pump_reference'] > 0.9)][['betaPA', 'ratio', 'timestamp'] ][dfc['betaPA']>1]
<ipython-input-33-a78d912e18c8>:1: UserWarning: Boolean Series key will be reindexed to match DataFrame index. dfc[(dfc['pump_AOM_freq'] == 83.0) & (dfc['pump_reference'] < 1.14) & (dfc['pump_reference'] > 0.9)][['betaPA', 'ratio', 'timestamp'] ][dfc['betaPA']>1]
| betaPA | ratio | timestamp | |
|---|---|---|---|
| 573 | 1.327300 | 0.628378 | 1900-01-01 23:27:59 |
| 574 | 1.840282 | 0.564625 | 1900-01-01 23:29:14 |
| 577 | 1.555463 | 0.565066 | 1900-01-01 23:32:55 |
| 583 | 2.520008 | 0.474172 | 1900-01-01 23:40:12 |
dfc[(dfc['pump_AOM_freq'] == 85.0) & (dfc['pump_reference'] < 1.14) & (dfc['pump_reference'] > 0.9)][['betaPA', 'ratio', 'timestamp'] ][dfc['betaPA']>1]
<ipython-input-34-365b98efa95f>:1: UserWarning: Boolean Series key will be reindexed to match DataFrame index. dfc[(dfc['pump_AOM_freq'] == 85.0) & (dfc['pump_reference'] < 1.14) & (dfc['pump_reference'] > 0.9)][['betaPA', 'ratio', 'timestamp'] ][dfc['betaPA']>1]
| betaPA | ratio | timestamp | |
|---|---|---|---|
| 212 | 1.015023 | 0.512176 | 1900-01-01 04:15:03 |
| 241 | 1.553289 | 0.422792 | 1900-01-01 04:49:53 |
dfc[(dfc['pump_AOM_freq'] == 84.0) & (dfc['pump_reference'] < 1.14) & (dfc['pump_reference'] > 0.9)][['betaPA', 'ratio', 'timestamp'] ][dfc['betaPA']>0.8]
<ipython-input-35-75505a28962d>:1: UserWarning: Boolean Series key will be reindexed to match DataFrame index. dfc[(dfc['pump_AOM_freq'] == 84.0) & (dfc['pump_reference'] < 1.14) & (dfc['pump_reference'] > 0.9)][['betaPA', 'ratio', 'timestamp'] ][dfc['betaPA']>0.8]
| betaPA | ratio | timestamp | |
|---|---|---|---|
| 98 | 1.213540 | 0.469758 | 1900-01-01 01:58:19 |
| 105 | 1.437785 | 0.450850 | 1900-01-01 02:06:43 |
| 110 | 0.952900 | 0.542567 | 1900-01-01 02:12:44 |
| 127 | 1.561206 | 0.449689 | 1900-01-01 02:33:06 |
dfc[(dfc['pump_AOM_freq'] == 84.0) & (dfc['pump_reference'] > 1.14) & (dfc['pump_reference'] > 1.3)][['betaPA', 'ratio', 'timestamp'] ][dfc['betaPA']>0.8]
<ipython-input-36-1407e5c5e2cb>:1: UserWarning: Boolean Series key will be reindexed to match DataFrame index. dfc[(dfc['pump_AOM_freq'] == 84.0) & (dfc['pump_reference'] > 1.14) & (dfc['pump_reference'] > 1.3)][['betaPA', 'ratio', 'timestamp'] ][dfc['betaPA']>0.8]
| betaPA | ratio | timestamp |
|---|
dfc[(dfc['pump_AOM_freq'] == 84.0) & (dfc['pump_reference'] > 1.14) & (dfc['pump_reference'] > 1.3)][['betaPA', 'ratio', 'timestamp'] ][dfc['betaPA']>0.3]
<ipython-input-37-14166250351b>:1: UserWarning: Boolean Series key will be reindexed to match DataFrame index. dfc[(dfc['pump_AOM_freq'] == 84.0) & (dfc['pump_reference'] > 1.14) & (dfc['pump_reference'] > 1.3)][['betaPA', 'ratio', 'timestamp'] ][dfc['betaPA']>0.3]
| betaPA | ratio | timestamp | |
|---|---|---|---|
| 132 | 0.396203 | 0.657676 | 1900-01-01 02:39:06 |
| 153 | 0.734277 | 0.528556 | 1900-01-01 03:04:19 |
| 158 | 0.538092 | 0.605325 | 1900-01-01 03:10:20 |
| 163 | 0.511799 | 0.639684 | 1900-01-01 03:16:20 |
dfc[(dfc['pump_AOM_freq'] == 83.0) & (dfc['pump_reference'] > 1.14) & (dfc['pump_reference'] > 1.3)][['betaPA', 'ratio', 'timestamp'] ][dfc['betaPA']>0.3]
<ipython-input-38-1dde2157d593>:1: UserWarning: Boolean Series key will be reindexed to match DataFrame index. dfc[(dfc['pump_AOM_freq'] == 83.0) & (dfc['pump_reference'] > 1.14) & (dfc['pump_reference'] > 1.3)][['betaPA', 'ratio', 'timestamp'] ][dfc['betaPA']>0.3]
| betaPA | ratio | timestamp | |
|---|---|---|---|
| 13 | 0.366904 | 0.721244 | 1900-01-01 00:16:16 |
| 20 | 0.514714 | 0.668415 | 1900-01-01 00:24:42 |
| 37 | 0.923729 | 0.576031 | 1900-01-01 00:45:06 |
| 40 | 0.553775 | 0.636621 | 1900-01-01 00:48:42 |
dfc[(dfc['pump_AOM_freq'] == 86.5) & (dfc['pump_reference'] <0.8) ][['betaPA', 'ratio', 'timestamp'] ][dfc['betaPA']>0.3]
<ipython-input-40-9166273068c8>:1: UserWarning: Boolean Series key will be reindexed to match DataFrame index. dfc[(dfc['pump_AOM_freq'] == 86.5) & (dfc['pump_reference'] <0.8) ][['betaPA', 'ratio', 'timestamp'] ][dfc['betaPA']>0.3]
| betaPA | ratio | timestamp | |
|---|---|---|---|
| 416 | 0.441389 | 0.781138 | 1900-01-01 08:20:13 |
| 418 | 0.720811 | 0.697746 | 1900-01-01 08:22:37 |
| 432 | 0.487096 | 0.762030 | 1900-01-01 08:39:26 |
| 440 | 2.001106 | 0.496847 | 1900-01-01 08:49:02 |
| 447 | 1.545051 | 0.524370 | 1900-01-01 08:57:26 |
# Plots for pampl 1.12, 1.49 and for pretty much all detunings (checked explictely for 7.0) make sense